/*
 * 编程输出某年某月有多少天（考虑到闰年）（5分）
 */

#include <stdio.h>

int main() {
	setbuf(stdout, NULL);

	int year, month;
	int get_return;

	printf("Input year,month:\n");
	get_return = scanf("%d,%d", &year, &month);

	if (get_return != 2 || month > 12 || month < 1) {
		printf("Input error!\n");
		return 0;
	}

	// 判断闰年
	if (year % 4 == 0 && year % 100 != 0 || year % 400 == 0) {
		switch (month) {
			case 1:
			case 3:
			case 5:
			case 7:
			case 8:
			case 10:
			case 12:
				printf("31 days\n");
				break;
			case 4:
			case 6:
			case 9:
			case 11:
				printf("30 days\n");
				break;
			case 2:
				printf("29 days\n");
		}
	} else {
		switch (month) {
			case 1:
			case 3:
			case 5:
			case 7:
			case 8:
			case 10:
			case 12:
				printf("31 days\n");
				break;
			case 4:
			case 6:
			case 9:
			case 11:
				printf("30 days\n");
				break;
			case 2:
				printf("28 days\n");
		}
	}

	return 0;
}